#pragma once

#include "ArkGraphicBase.h"
#include "IRenderSystem.h"
#include "CPos.h"
#include "CRectangle.h"

#include "TDNode.h"

class IGraphic /*:public IArkUnknown*/:public tNode
{
public:
	virtual void			InsertRenderSystem( IRenderSystem* pRenderSys ) = 0;
	virtual void			DeleteRenderSystem( IRenderSystem* pRenderSys ) = 0;

	virtual HRESULT			CreateArkTexture( int32 nWidth, int32 nHeight, TEXTUREFORMAT eFormat, void** pText ) = 0;
	virtual HRESULT			CreateArkTexture( LPCTSTR szName, void** pText ) = 0;
	virtual HRESULT			CreateArkFont( UINT size, LPCTSTR szName, void** pFont ) = 0;
	virtual HRESULT			CreateArkModel( LPCTSTR szName, void** pModel ) = 0;
	virtual HRESULT			CreateArkPieceGroup( LPCTSTR szName, void** pPieceGroup ) = 0;
	virtual HRESULT			CreateArkAnimationGroup( LPCTSTR szName, void** pAnimationGroup ) = 0;

	virtual void			DrawRect( const CFRect& rt, DWORD Color, const void* pTexture, const CFRect* rtText = NULL, ARKRS RS = RS_GUI, float z = MAX_DEPTH ) = 0;
	virtual void			DrawRect( const CFRect& rt, DWORD Color, const void* pTexture, const CPosRect& rtText, ARKRS RS = RS_GUI, float z = MAX_DEPTH ) = 0;
	
	virtual void			DrawRectGroup( const void* pTexture, ARKRS RS, const RectGroup* rt, int nNum ) = 0;
	virtual void            DrawLine( const PointGroup* pPointGroup, int nNum, bool b2D = true, ARKRS RS = RS_GUI ) = 0;

    virtual bool            PickUp( int xScreen, int yScreen, const CVector3f& vScale, const CVector3f& vOffset, const CMatrix& matWorld ) = 0;
    virtual float           SceneToScreen( int& xScreen, int& yScreen, const CVector3f& vScene ) = 0;

};